package com.hzncc.flowable_diboot.custom_field.entity;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.lang.Double;
import java.math.BigDecimal;

import jakarta.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import com.diboot.core.util.D;
import com.diboot.core.entity.BaseModel;
import com.diboot.core.entity.BaseEntity;
import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * 自定义表格项配置 Entity 定义
 *
 * @author MyName
 * @version 1.0
 * @date 2024-11-14
 * Copyright © MyCorp
 */
@TableName("mdl_custom_table_item_config")
@Getter
@Setter
@Accessors(chain = true)
public class CustomTableItemConfig extends BaseModel {
    private static final long serialVersionUID = 1218673903058221916L;
    /**
     * 租户
     */
    @NotNull(message = "租户不能为空")
    @TableField()
    private String tenantId;

    /**
     * 字段名
     */
    @Length(max = 100, message = "字段名长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String fieldName;

    /**
     * 列名
     */
    @Length(max = 100, message = "列名长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String fieldLabel;

    /**
     * 是否显示
     */
    @TableField()
    private Boolean viewable;

    /**
     * 类型
     */
    @TableField()
    private String type;

    /**
     * 列宽
     */
    @Length(max = 100, message = "列宽长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String width;

    /**
     * 是否导出
     */
    @TableField()
    private Boolean exportable;

    /**
     * 表格配置id
     */
    @Length(max = 100, message = "表格配置id长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String customTableConfigId;

    /**
     * 排序字段
     */
    @TableField
    private Integer sort;

    /**
     * 是否合计 0 否 1 是
     */
    @TableField
    private Integer summary;
}